package test.zuche;

public class MinCar extends Car{
    private final int num=5;

    public MinCar() {
    }

    public MinCar(String name, String chepai, int money, boolean chuzu) {
        super(name, chepai, money, chuzu);
    }

    @Override
    public double money(int day) {
        if (day>=7){
            return getMoney()*day*0.9;
        } if (day>=30){
            return getMoney()*day*0.8;
        } if (day>=150){
            return getMoney()*day*0.7;
        }
        return getMoney()*day;
    }

    @Override
    public void infor() {
        super.infor();
        System.out.println("车类型：轿车");
        System.out.println("车座位数为："+num);
    }

    public int getNum() {
        return num;
    }
}
